package com.fi.common.exception;

import java.io.PrintWriter;
import java.io.StringWriter;

import com.fi.common.log.FiLog;

public class ExceptionUtils {
	public static String getErrorInfoFromException(Exception e) {  
        try {  
            StringWriter sw = new StringWriter();  
            PrintWriter pw = new PrintWriter(sw);  
            e.printStackTrace(pw);  
            return "\r\n" + sw.toString() + "\r\n";  
        } catch (Exception e2) {  
            return "bad getErrorInfoFromException";  
        }  
    }
	public static void Log(Exception e) {
		FiLog.appLogE(getErrorInfoFromException(e));
    }
	public static void NativeLog(Exception e) {
		FiLog.appNativeLog(getErrorInfoFromException(e));
    } 
	
}
